package com.pimee.common.util;

import org.apache.ibatis.session.RowBounds;

public class RowBoundUtil {
	/**
	 * 根据分页属性 生成 RowBounds
	 * 
	 * @param pageSize
	 * @param pageNum
	 * @return
	 */
	public static RowBounds getRowBounds(int pageNum, int pageSize) {
		int limit = pageSize;
		int offset = pageNum * limit;
		RowBounds rowBounds = new RowBounds(offset, limit);
		return rowBounds;
	}
}
